export const useAppStore = defineStore("app", () => {
  const state = reactive({
    collapsed: false, //侧边栏是否折叠
  });
  const toggleSidebar = () => {
    state.collapsed = !state.collapsed;
    console.log(' state.collapsed:',  state.collapsed)
  };
  return {
    state,
    toggleSidebar,
  };
},{
    persist:{
        storage:window.sessionStorage,
        pick:['state.collapsed']
    }
});
